In some applications of the computer processing of video content, there is a need to estimate the orientation of a given video. For example, a context of such applications is that when a person wants to browse and watch a video, it is necessary to have the correct orientation of the video for a correct display of the video. Another context is in the computer vision processing, such as face detection, specific object detection and recognition, sky regions detection and more general semantic video parsing. As an initial requirement in this case, the images and videos to be processed are supposed to be proposed with correct orientations. Therefore, the determination of the orientation of a video might be applied as a first and essential preprocessing for such computer vision processing.
One known solution to get the correct orientation of a video needs to use additional metadata stored with the video content during the capture of the video. For example, such additional metadata can be from the metadata tags defined in the Exif (Exchangeable image file format) standard. The orientation knowledge relies on the gyro info. In this case, the presence of such metadata will depend on the capture devices used. However, such information is normally not available for low-cost devices. Certain mobile phones, e.g., iphones, do not have such information, whereas low cost smart phones will not store the information. Furthermore, in case of a video, the orientation information is computed only based on the first image of the video, and will not change in case of a rotation during the capture. With this known solution, the orientation information may therefore be true only for the first part of the video.
Another known solution is called an automatic system. The following documents relate to such automatic system which can automatically detect the orientation of a still image:    [1] Cingovska, I.; lvanovski, Z.; Martin, F., Automatic image orientation detection with prior hierarchical content-based classification, Image Processing (ICIP), 2011 18th IEEE International Conference on, vol., no., pp. 2985,2988, 11-14 Sep. 2011    [2] G. Sharma, A. Dhall, S. Chaudhury and R. Bhatt, Hierarchical System for Content Based Categorization and Orientation of Consumer Images, Pattern Recognition and Machine Intelligence, vol 5909, p 495-500, 2009.    [3] Jiebo Luo; Boutell, M., Automatic image orientation detection via confidence-based integration of low-level and semantic cues, Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 27, no. 5, pp. 715,726, May 2005
However, as mentioned above, it seems that the objective of the above three documents is to detect the orientation for still images since no references of systems processing videos were discussed. The proposed systems for still images are usually based on the extraction of features from the image and the use of some machine learning techniques. This implies that a first step of training of a model is needed on a database of annotated images, which may result in a costly off-line processing. The best performing system also uses different features extracted from the video content, ranging from color or texture-related low-level features (first color moments, Edge Direction Histograms, etc.) to higher-level semantic information (face detection, sky detection, lines detection, etc.), which takes most of the time of the system and leads to a heavy computation load. Such processing on still images could be applied on a frame by frame basis on each frame of the video, or on a subsampling of these frames. However, the consequence is that the processing becomes even more expensive from the computation point of view.
Therefore, there is a need to detect, with a reasonable computation load, the correct orientation of a given video, and at the same time to ensure that the detected orientation is correct for each frame of the video (it assumes that the device for capturing the video may be rotated during the capture phase).